Skip to content

ci: add local pre-commit hook to write datasets.yaml #1145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 27, 2025

Conversation

dkrako
Copy link
Contributor

@dkrako dkrako commented May 9, 2025

Description

Building up on @SiQube's work in #914 this PR adds a pre-commit hook to autowrite the required src/pymovements/datasets/datasets.yaml.

Implemented changes

  • add write_datasets_yaml.py including a main() function
  • add script as local pre-commit hook in .pre-commit-config.yaml

How Has This Been Tested?

Basic tests which compare the resulting datasets.yaml against the expected one:

  • empty datasets directory
  • single yaml definition
  • two yaml definitions

Context

related issues:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@dkrako dkrako linked an issue May 9, 2025 that may be closed by this pull request
Copy link

codecov bot commented May 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (c1e7576) to head (dff6b55).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #1145      +/-   ##
===========================================
+ Coverage   99.95%   100.00%   +0.04%     
===========================================
  Files          92        93       +1     
  Lines        4026      4042      +16     
  Branches      714       715       +1     
===========================================
+ Hits         4024      4042      +18     
+ Misses          1         0       -1     
+ Partials        1         0       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dkrako dkrako changed the title ci: add pre-commit hook to write datasets.yaml ci: add local pre-commit hook to write datasets.yaml May 26, 2025
@dkrako dkrako force-pushed the ci/pre-commit-write-datasets-yaml branch from 2cb43ae to ccad07e Compare May 26, 2025 08:32
@dkrako dkrako marked this pull request as ready for review May 26, 2025 09:59
@dkrako dkrako requested review from SiQube and prassepaul as code owners May 26, 2025 09:59
@dkrako dkrako enabled auto-merge (squash) May 26, 2025 09:59
Copy link
Member

@SiQube SiQube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dkrako dkrako merged commit 3d85f90 into main May 27, 2025
26 checks passed
@dkrako dkrako deleted the ci/pre-commit-write-datasets-yaml branch May 27, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants